package com.homestay.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.homestay.beans.LandlordInfoBean;
import com.homestay.service.ILandlordInfoService;
/**
 * 显示房东的所有信息
 * @author Administrator
 *
 */
@Controller
public class LandlordInfoController {
	
	@Autowired
	private ILandlordInfoService landlordService;
	
	/**
	 * 查询房东的所有信息
	 * @param l_id
	 * @return
	 */
	@RequestMapping("/showLandlordInfo.action")	
	@ResponseBody
	public  LandlordInfoBean findById(@RequestParam Integer l_id){
		LandlordInfoBean landlordInfo=landlordService.findAll(l_id);
		System.out.println(landlordInfo);
		return landlordInfo;
	}
	
	
	@RequestMapping("/updateLandlordInfo.action")
	@ResponseBody
	public void updateLandlordInfo(
			@RequestParam Integer l_id,
			@RequestParam String headImg,
			@RequestParam String nickname,
			@RequestParam String realname,
			@RequestParam String CardID,
			@RequestParam String sex,
			@RequestParam Integer age,
			@RequestParam String email,
			@RequestParam String mobile
			){
		System.out.println(l_id);
		System.out.println(headImg);
		System.out.println(nickname);
		System.out.println(realname);
		System.out.println(CardID);
		System.out.println(sex);
		System.out.println(age);
		System.out.println(email);
		System.out.println(mobile);
	}
}
